/**
 Copyright (c) 2020-2022 宁波哥爱帮科技有限公司
 */
package cn.grab.fispapi.authentication.common.dtos;

import lombok.Data;

/**
 * @description 分页查询dto
 * @author 16411
 * @date 2022/12/29 13:31
 */
@Data
public class PageRequestDTO {

  protected Integer size;
  protected Integer page;

  public void checkParam() {
    if (this.page == null || this.page < 0) {
      setPage(1);
    }
    if (this.size == null || this.size < 0 || this.size > 100) {
      setSize(5);
    }
  }

}
